/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。
 * 
 * 欢迎到知启蒙网站（https://www.zhiqim.com）购买正版软件，知启蒙还提供许多开源框架和软件。
 * 
 * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护，其所有知识产权归湖南知启蒙科技有限公司所有；
 * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码，或者基于本软件产品创作衍生作品；
 * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码；
 * 4、个别授权：如需进行商业性的销售、复制、分发，包括但不限于软件销售、预装、捆绑等，必须获得知启蒙的书面授权和许可；
 * 5、保留权利：本注释未明示授权的其他一切权利仍归知启蒙所有，任何人使用其他权利时必须获得知启蒙的书面同意。
*/
package net.redxyz.top.dbo.sys;

import java.io.Serializable;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 淘宝API 调用日志 对应表《TAOBAO_API_ACCESS_LOG》
 */
@AnAlias("TaobaoApiAccessLog")
@AnNew
@AnTable(table="TAOBAO_API_ACCESS_LOG", key="", type="InnoDB")
@AnIndex({@AnIndexValue(name="IX_INVOCK_STACK_ID", column="INVOCK_STACK_ID", unique=false),
          @AnIndexValue(name="IX_REQ_DAY_DATE", column="REQ_DAY_DATE", unique=false),
          @AnIndexValue(name="IX_METHOD_NAME", column="METHOD_NAME", unique=false),
          @AnIndexValue(name="IX_USER_NICK", column="USER_NICK", unique=false),
          @AnIndexValue(name="IX_REQUEST_ID", column="REQUEST_ID", unique=false),
          @AnIndexValue(name="IX_IS_SUCCESS", column="REQ_DAY_DATE", unique=false)})
public class TaobaoApiAccessLog implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="USER_NICK", type="string,100", notNull=false)    private String userNick;    //1.用户名
    @AnTableField(column="METHOD_NAME", type="string,128", notNull=false)    private String methodName;    //2.调用接口方法
    @AnTableField(column="REQUEST_ID", type="string,32", notNull=false)    private String requestId;    //3.淘宝请求ID
    @AnTableField(column="REQUEST_INFO", type="string,300000", notNull=true)    private String requestInfo;    //4.请求信息
    @AnTableField(column="CODE", type="int", notNull=false)    private int code;    //5.错误码
    @AnTableField(column="SUB_MESSAGE", type="string,8000", notNull=false)    private String subMessage;    //6.错误信息
    @AnTableField(column="SUB_CODE", type="string,64", notNull=false)    private String subCode;    //7.子错误吗
    @AnTableField(column="ERROR_MSG", type="string,400", notNull=false)    private String errorMsg;    //8.错误信息
    @AnTableField(column="INVOCK_STACK_ID", type="string,64", notNull=false)    private String invockStackId;    //9.程序代码位置，ID
    @AnTableField(column="CREATE_TIME", type="string,20", notNull=true)    private String createTime;    //10.入库时间
    @AnTableField(column="REQ_TIME", type="string,20", notNull=true)    private String reqTime;    //11.请求时间
    @AnTableField(column="RSP_TIME", type="string,20", notNull=false)    private String rspTime;    //12.响应时间
    @AnTableField(column="IS_SUCCESS", type="boolean", notNull=true)    private boolean isSuccess;    //13.是否调用成功
    @AnTableField(column="REQ_DAY_DATE", type="string,20", notNull=true)    private String reqDayDate;    //14.请求的日期，yyyy-mm-dd

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getUserNick()
    {
        return userNick;
    }

    public void setUserNick(String userNick)
    {
        this.userNick = userNick;
    }

    public String getMethodName()
    {
        return methodName;
    }

    public void setMethodName(String methodName)
    {
        this.methodName = methodName;
    }

    public String getRequestId()
    {
        return requestId;
    }

    public void setRequestId(String requestId)
    {
        this.requestId = requestId;
    }

    public String getRequestInfo()
    {
        return requestInfo;
    }

    public void setRequestInfo(String requestInfo)
    {
        this.requestInfo = requestInfo;
    }

    public int getCode()
    {
        return code;
    }

    public void setCode(int code)
    {
        this.code = code;
    }

    public String getSubMessage()
    {
        return subMessage;
    }

    public void setSubMessage(String subMessage)
    {
        this.subMessage = subMessage;
    }

    public String getSubCode()
    {
        return subCode;
    }

    public void setSubCode(String subCode)
    {
        this.subCode = subCode;
    }

    public String getErrorMsg()
    {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg)
    {
        this.errorMsg = errorMsg;
    }

    public String getInvockStackId()
    {
        return invockStackId;
    }

    public void setInvockStackId(String invockStackId)
    {
        this.invockStackId = invockStackId;
    }

    public String getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(String createTime)
    {
        this.createTime = createTime;
    }

    public String getReqTime()
    {
        return reqTime;
    }

    public void setReqTime(String reqTime)
    {
        this.reqTime = reqTime;
    }

    public String getRspTime()
    {
        return rspTime;
    }

    public void setRspTime(String rspTime)
    {
        this.rspTime = rspTime;
    }

    public boolean isSuccess()
    {
        return isSuccess;
    }

    public void setSuccess(boolean isSuccess)
    {
        this.isSuccess = isSuccess;
    }

    public String getReqDayDate()
    {
        return reqDayDate;
    }

    public void setReqDayDate(String reqDayDate)
    {
        this.reqDayDate = reqDayDate;
    }

}
